﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Cms.Tests.Unit.Utilities
{
    [TestClass]
    public class HtmlTests
    {
        [TestMethod]
        public void Encode_SwedishCharacters_Success()
        {
            Assert.AreEqual("m&aring;nga", Cms.Utilities.Html.Encode("många"));
            Assert.AreEqual("&auml;r", Cms.Utilities.Html.Encode("är"));
            Assert.AreEqual("&ouml;ra", Cms.Utilities.Html.Encode("öra"));
            Assert.AreEqual("&Aring;ra", Cms.Utilities.Html.Encode("Åra"));
            Assert.AreEqual("&Auml;rva", Cms.Utilities.Html.Encode("Ärva"));
            Assert.AreEqual("&Ouml;re", Cms.Utilities.Html.Encode("Öre"));
            Assert.AreEqual("abc&aring;&auml;&ouml;&Aring;&Auml;&Ouml;def", Cms.Utilities.Html.Encode("abcåäöÅÄÖdef"));
        }
    }
}
